package com.zmyuan.quartz.web.demo;

import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.SchedulerFactory;

/**
 * Created by zhudebin on 16/7/21.
 */
public class SchedularUtil {

    private static SchedulerFactory schedFact = new org.quartz.impl.StdSchedulerFactory();

    private static Scheduler sched = null;

    public static Scheduler getSched() throws SchedulerException {
        if(sched == null) {
            synchronized (SchedularUtil.class) {
                if (sched == null) {
                    sched = schedFact.getScheduler();
                }
            }
        }
        return sched;
    }

    public static void addJob() {

    }

    public static void startJob() {

    }

    public static void pauseJob() {

    }

    public static void removeJob() {

    }

    public static void updateJob() {

    }

}
